<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>金字塔</title>
    <style>
        body{
            font-family: Batang;
        }
    </style>
</head>
<body>
<script>
    for (var i = 1;i<10;i++){
        for (var a = 1;a<10-i;a++){
            document.write("&nbsp;");
        }
        for (var b = 0;b<i*2-1;b++){
            document.write("*");
        }
        document.write("<br />")
    }
</script>
</body>
</html>